﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BHBC.Comm
{
    public class DBLog
    {
        public static void WriteDBLog( int type, string title, string content)
        {
            try
            {
                string sql = "insert into tb_Sys_log(title,type,content,state) values (@title,@type,@content,@state)";
                ZFrameWork.Util.ParamsBuilder pb = new ZFrameWork.Util.ParamsBuilder();
                pb.Append("@title", title);
                pb.Append("@type", type);
                pb.Append("@content", content);
                pb.Append("@state", 0);
                ZFrameWork.DB.TableAccess.ExecuteNoneQueryWithParameters(PubMemContainer.CommonDB, sql, pb.GetParams());
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
    }
}
